assume cs:code
code segment
start: mov ax,cs
       mov ds,ax
       mov si,offset s1
       mov ax,0
       mov es,ax
       mov di,200h
       mov cx,offset s4-offset s1
       cld
       rep movsb

       mov ax,0
       mov ds,ax
       mov word ptr ds:[7ch*4],200h
       mov word ptr ds:[7ch*4+2],0

       mov ax,4c00h
       int 21h

   s1: push ax
       push bx
       push cx
       push dx
       push si
       push di
       mov di,0
       mov ax,0b800h
       mov es,ax
       mov ax,160
       mul dh
       add di,ax
       mov ax,2
       mul dl
       add di,ax
       mov bl,cl
   s2: mov al,ds:[si]
       mov ch,0
       mov cl,al
       jcxz s3
       mov es:[di],al
       mov es:[di+1],bl
       inc si
       add di,2
       jmp short s2
   s3: pop di
       pop si
       pop dx
       pop cx
       pop bx
       pop ax
       iret
   s4: nop

code ends
end start
